<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"  xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
        <title>TODO supply a title</title>
    </h:head>
    <h:body>
        <ui:composition template="./HomeTemp.xhtml">
            <ui:define name="listevent">
        <div style="width: 78%; margin-left: 22%">
            
                 <h:form id="form">  
                     
                     <p:dataGrid var="event" value="#{eventBean.eventList}" columns="3" style="font-size: 12px"
                    rows="12" paginator="true"  
                    paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                    rowsPerPageTemplate="9,12,15">  

                        <p:panel header=" Event: #{event.eventName}" style="font-size: 12px">  
                            <h:panelGrid columns="1">     
                                <p:graphicImage style="width: 85%; height: 57%; margin-left: 8%" value="../Images/laser-event.jpg"/>
                                <p:commandLink style="float: right" ajax="false" title="View Detail" action="#{eventBean.urlEventDetails()}" >  
                                    <h:outputText value="Detail" style="margin:0 auto;" />   
                                    <f:param name="eventId" value="#{event.eventID}"/>
                                </p:commandLink>  
                            </h:panelGrid>   
                        </p:panel>       
                    </p:dataGrid>  
                        
                    <p:dialog header="Event Detail" widgetVar="eventDialog" width="422" modal="true">  
                        <p:outputPanel id="carDetail"  layout="block">  

                            <h:panelGrid id="display" columns="2" cellpadding="4"> 
                                        <h:outputText value="Event Name: " />  
                                        <h:outputText value="#{eventBean.eventEntities.eventName}" id="eventName"/>
                                        <h:outputText value="Start Date: " />  
                                        <h:outputText value="#{eventBean.eventEntities.startDate}" id="startDate"/>
                                        <h:outputText value="End Date: " />  
                                        <h:outputText value="#{eventBean.eventEntities.endDate}" id="endDate"/>
                                        <h:outputText value="Address: " />  
                                        <h:outputText value="#{eventBean.eventEntities.address}" id="address"/>
                                        <h:outputText value="Description: " />  
                                        <h:outputText value="#{eventBean.eventEntities.description}" id="description"/>
                                        <h:outputText value="Price: " />  
                                        <h:outputText value="#{eventBean.eventEntities.price}" id="price"/>
                                        <h:outputText value="Name Win: " />  
                                        <h:outputText value="#{eventBean.eventEntities.nameWin}" id="nameWin"/>
                            </h:panelGrid>
                        </p:outputPanel>  
                    </p:dialog>  

                </h:form>
            </div>
            </ui:define>
        </ui:composition>
    </h:body>
</html>
